<script>

	function posting_jurnal(){
		$.ajax({
				type: 'POST',
				url: "<?=base_url().'index.php/mutasi_kas/posting_mutasi_kas/'?>",
				data: $('#mutasi_kas').serialize(),
				success: function(data) {
					$.fancybox.close();
					window.location.href="<?=base_url().'index.php/mutasi_kas/insert/'?>";
				}
			});
			return false;		
	}
	

	  
</script>

<table border="0" cellpadding="0" cellspacing="0"  class="display" id="transaction-table">	
				<thead>
					<tr>										
						<th class="table-header-repeat line-left minwidth-0" width="10px"><a href="">GLID</a></th> 
						<th class="table-header-repeat line-left minwidth-1"><a href="">TANGGAL</a></th>	
						<th class="table-header-repeat line-left minwidth-0"><a href="">AKUNID</a></th>		 						
						<th class="table-header-repeat line-left minwidth-1"><a href="">NAMA AKUN</a></th>  
						<th class="table-header-repeat line-left minwidth-1"><a href="">DEBET</a></th>		
						<th class="table-header-repeat line-left minwidth-1"><a href="">KREDIT</a></th>	 						
					</tr>
				</thead>  
<tbody>
	<?php
		$attributes = array('name' => 'posting_mutasi_kas', 'id' => 'posting_mutasi_kas', 'class'=>'block-content form');
		echo form_open('mutasi_kas/posting_mutasi_kas', $attributes);
	?>
	<?php for ($i=0;$i<count($akunid);$i++){ ?>
	<tr>
		<td><?=$glid. '<input type="hidden" name="glid" value="' . $glid . '">';?></td>
		<td><?=$tanggal. '<input type="hidden" name="tanggal" value="' . $tanggal . '">';?></td>
		<td><?=$akunid[$i]. '<input type="hidden" name="akunid[]" value="' . $akunid[$i] . '">';?></td>
		<td><?=$nakun[$i]?></td>
		<td><?=$debet[$i]. '<input type="hidden" name="debet[]" value="' . $debet[$i] . '">';?></td>
		<td><?=$kredit[$i]. '<input type="hidden" name="kredit[]" value="' . $kredit[$i] . '">';?></td>
	</tr>
	<?php } ?>
	<tr>
		<td><input type="button" onclick="posting_jurnal()" value="Simpan" class="form-submit"></td>
		<td><input type="reset" value="Batal" class="form-reset"></td>
		<td colspan="4"></td>
	</tr>
	</form>
</tbody>

</table>


